package com.software.project_view.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.text.SimpleDateFormat;
import java.util.Date;

@Data
@NoArgsConstructor
public class SubmitItem {

    private String id;
    private String groupName;
    private String submitTime;
    private String projectName;

    public static String formatTime(Date date) {
        SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return sd.format(date);
    }

    public SubmitItem(String id, String groupName, String projectName) {
        this.id = id;
        this.groupName = groupName;
        this.projectName = projectName;
    }
}
